#pragma once
#include "common_tool/factory.h"
#include "vehicle_cvx_mpc_base.hpp"

namespace auto_ros
{
namespace control
{
template <class derived>
VehicleCvxMpcBase *createCvxMpcDerived(const std::string dyn_mpc_kf_config_path_name, const std::string vehicle_lmpc_yaml_name, double rate)
{
	return new derived(dyn_mpc_kf_config_path_name, vehicle_lmpc_yaml_name, rate);
}
using vehicle_cvx_mpc_factory_type =
	auto_ros::common_tool::Factory<std::string, VehicleCvxMpcBase, VehicleCvxMpcBase *(*)(const std::string dyn_mpc_kf_config_path_name, const std::string vehicle_lmpc_yaml_name, double rate)>;
class VehicleCvxMpcFactory : public vehicle_cvx_mpc_factory_type
{
private:
	/* data */
public:
	VehicleCvxMpcFactory()
	{
		//Register("KfLateral", createKfDerived<KfLateral>);
		Register("VehicleLateralSpeed3disMpc", createCvxMpcDerived<VehicleLateralSpeed3disMpc>);
		Register("VehicleLateralSpeedMpc", createCvxMpcDerived<VehicleLateralSpeedMpc>);
		Register("VehicleLateralSpeedYawMpc", createCvxMpcDerived<VehicleLateralSpeedYawMpc>);
		Register("VehicleLLMpc", createCvxMpcDerived<VehicleLLMpc>);
		Register("VehicleLL4d4sMpc", createCvxMpcDerived<VehicleLL4d4sMpc>);
	}
};
} // namespace control
} // namespace auto_ros
